<?php
function getMenuProCate($pid=0)
{
	$ci = get_instance();
	$ci->db->where('parent_id', $pid);
	$ci->db->where('bl_active', 1);
	$query = $ci->db->get('aw_product_category');
	return $query->result();
}
// sản phẩm bán chạy
function getProductBuyMore()
{
	$ci = get_instance();
	$ci->db->select('products_id,code,image,name,name_alias,viewed,sprice,price');
	$ci->db->where('bl_active', 1);
	$ci->db->order_by('viewed', 'DESC');
	$query = $ci->db->get('aw_products',10,0);
	return $query->result();
}